//
//  PhoneCodeLoginService.swift
//  User
//
//  Created by ET|冰琳 on 2017/1/9.
//  Copyright © 2017年 IB. All rights reserved.
//

import ReactiveSwift


public protocol PhoneCodeLoginService {
    
    associatedtype PhoneCodeLoginResult
    associatedtype PhoneCodeResult
    
    /// 获取登陆验证码
    func getVerifyCodeOf(phone: String?) -> SignalProducer<PhoneCodeResult, NSError>
    
    /// 手机号 验证码登录
    /// login with phone and verify code
    ///
    /// - Parameters:
    ///   - phone: String
    ///   - code:  String
    /// - Returns: SignalProducer<ResultType, NSError>
    func loginWith(phone: String?, code: String?) -> SignalProducer<PhoneCodeLoginResult, NSError>
}
